import request from '@/axios'
/**
 * 本月违章查处明细报表
 * @param params
 * @returns
 */
export const getCurrentMonthReportApi = (params) => {
  return request.get({ url: '/api/ProblemFile/CurrentMonthReport', params })
}

/**
 * 本年违章查处明细报表
 * @param params
 * @returns
 */
export const getCurrentYearReportApi = () => {
  const date = new Date()
  const currentYear = date.getFullYear()
  const params = { year: currentYear }
  return request.get({ url: '/api/ProblemFile/CurrentYearReport', params })
}
/**
 * 本月上传情况
 * @param params
 * @returns
 */
export const getUpCurrentMonthReportApi = () => {
  const date = new Date()
  const currentYear = date.getFullYear()
  const currentMonth = date.getMonth() + 1
  const params = { year: currentYear, month: currentMonth }
  return request.get({ url: '/api/file/CurrentMonthReport', params })
}

/**
 * 本月连续三天未上传视频班组明细
 * @param params
 * @returns
 */
export const getCurrentThreeDayReportApi = () => {
  const date = new Date()
  const currentYear = date.getFullYear()
  const currentMonth = date.getMonth() + 1
  const params = { year: currentYear, month: currentMonth }
  return request.get({ url: '/api/file/CurrentThreeDayReport', params })
}

/**
 * 本月上传视频质量不达标班组排行
 * @param params
 * @returns
 */
export const getQualityReportRankingApi = () => {
  const date = new Date()
  const currentYear = date.getFullYear()
  const currentMonth = date.getMonth() + 1
  const params = { year: currentYear, month: currentMonth }
  return request.get({ url: '/api/ProblemFile/QualityReportRanking', params })
}

/**
 * 是否有警告信息 true有，false无
 * @param params
 * @returns
 */
export const getWarnInfoApi = () => {
  return request.get({ url: '/api/Log/GetWarnInfo' })
}
/**
 * 返回最新的10条违章视频
 * @returns
 */
export const GetTop10ProblemVideosApi = () => {
  return request.get({ url: '/api/ProblemFile/GetTop10ProblemVideos' })
}
